import React from 'react'
import Taro from '@tarojs/taro'
import { AtIcon } from 'taro-ui'
import './index.scss'
import { View, Text } from '@tarojs/components'

export default function CMore({ name, color, subTitle, enTitle }) {
  function onChangeAtListItem() {
    Taro.navigateTo({
      url: '/pages/Home/RecommendMore/index',
    })
  }
  return (
    <View className='more_wrapper'>
      <View className='more_letf'>
        <View className='title'>
          <Text className='zh_title'>
            <Text className='color_title' style={{ color: color }}>
              {name.slice(0, 2)}
            </Text>
            {name.slice(2)}
          </Text>
          <Text className='en_title color_title' style={{ color: color }}>
            {enTitle}
          </Text>
        </View>
        <View className='sub_title'>{subTitle}</View>
      </View>
      <View className='more_right' onClick={onChangeAtListItem}>
        <Text className='more_text'>更多</Text>
        <AtIcon value='chevron-right' size='22' color='rgb(185, 184, 184)'></AtIcon>
      </View>
    </View>
    // <AtList>
    //   <AtListItem
    //     onClick={onChangeAtListItem}
    //     arrow='right'
    //     title={name}
    //     extraText='更多'
    //   />
    // </AtList>
  )
}
